<script lang="ts" setup>
import { bodyRows } from "@/config/ads_ids";
import { classNameHomeListItem } from "@/config/const_var";
import { useRefModel } from "@/utils/hooks";
defineOptions({
  name: "HomeListItem",
});
let props = defineProps({
  content: {
    type: [String],
  },
  title: {
    type: [String],
  },
  item: {
    type: [Object],
    default: () => ({}),
  },
  isShowReadMore: {
    type: [Boolean],
    default: false,
  },
  coverImg: {
    type: [String],
  },
  ads_id_320_100: {
    type: [String, Number],
  },
  isShowAdvert: {
    type: [Boolean],
    default: true,
  },
  ads_type: {
    type: [String, Number],
    default: 1, // 320 * 100
  },
  ads_class: {
    type: [String],
    default: "br-rb-lb-10",
  },
  bodyRows: {
    type: [String, Number],
    default: bodyRows.value,
  },
});
let emit = defineEmits([
  "update:isShowReadMore",
  "update:content",
  "update:title",
  "update:item",
  "update:coverImg",
  "update:ads_id_320_100",
  "update:isShowAdvert",
  "update:ads_type",
  "update:ads_class",
  "update:bodyRows",
]);
let isShowReadMore = useRefModel(props, "isShowReadMore", emit);
let content = useRefModel(props, "content", emit);
let title = useRefModel(props, "title", emit);
let item = useRefModel(props, "item", emit);
let coverImg = useRefModel(props, "coverImg", emit);
let ads_id_320_100 = useRefModel(props, "ads_id_320_100", emit);
let isShowAdvert = useRefModel(props, "isShowAdvert", emit);
let ads_type = useRefModel(props, "ads_type", emit);
let ads_class = useRefModel(props, "ads_class", emit);
let body_rows = useRefModel(props, "bodyRows", emit);
</script>
<template>
  <div :class="classNameHomeListItem">
    <HomeFirstItem
      v-model:content="content"
      v-model:title="title"
      v-model:item="item"
      v-model:isShowReadMore="isShowReadMore"
      v-model:coverImg="coverImg"
      v-model:isShowAdvert="isShowAdvert"
      v-model:ads_id_320_100="ads_id_320_100"
      v-model:ads_type="ads_type"
      v-model:ads_class="ads_class"
      v-model:bodyRows="body_rows"
      :calc_type="2"
    />
  </div>
</template>
<style lang="scss" scoped>
.#{$scss-classNameHomeListItem} {
}
</style>
